home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 12 C64 Telecom / BXD.TXT < prev    next >
Encoding:
Text File  |  2019-04-13  |  6.0 KB  |  183 lines

  1.  Ya say you can't download because you
  2. only have a dumb terminal program.
  3.  Ya say if you could download, that you
  4. would download a new terminal program
  5. that could download. (Catch 22!)
  6.  
  7.  Well! I tell ya what I'm gonna do...
  8. Step right up and copy down the
  9. following SHORT program. Type it in and
  10. save it to disk.
  11.  The program is a simple Bootstrap
  12. XMODEM Downloader, and if the wind is
  13. blowing right, will permit you to
  14. download from Compuserve's CBIG Sig,
  15. the full featured Xmodem terminal
  16. program > CBTERM/C64. 
  17. Once you have CBTERM/C64, you can
  18. up or download anything to/from CIS and
  19. any Xmodem BBS systems.
  20.  
  21.  Step closer young man, and I'll tell
  22. you how it works.....
  23.  
  24. The program (which I will call BXD.BAS)
  25. is a short routine to only download
  26. a file in xmodem. It is used in
  27. conjunction with your present terminal
  28. program. You use your present dumb
  29. terminal program to go on line and
  30. connect with CIS. You then goto
  31. the CBIG Sig, (GO CBIG at the ! prompt)
  32. and into its DL2 data library. There
  33. you find the latest version of
  34. CBTERM/C64. You must get the .BIN
  35. version of CBTERM. (not the .IMG
  36. version)
  37. You instruct CIS to Download the
  38. CBTERM program using XMODEM protocol.
  39. CIS will respond that it is begining
  40. the download. At this point you EXIT
  41. your terminal program (KEEP YOUR MODEM
  42. ON LINE! JUST EXIT YOUR TERMINAL 
  43. PROGRAM.) and quickly load BXD.BAS.
  44. Then you just RUN it. 
  45. BXD will then do an XMODEM download
  46. of the file and write it to disk. If
  47. all works well, in 15 mins. you should
  48. have a brand spanking new copy of
  49. CBTERM/C64 on your disk. (note: only
  50. run your dumb terminal program and
  51. BXD.BAS at 300 baud.) 
  52. BXD.BAS does the following:
  53.  When RUN, will handshake to CIS to
  54. start the transfer. A disk file is
  55. opened and is called CBTERM into 
  56. which the incomming data is written.
  57.  BXD then waits to recieve data blocks
  58. of 132 bytes long. Each block has
  59. a checksum that is matched and if
  60. found to be wrong, the block is rejected
  61. and cis sends it again. (note: the
  62. first block is offen rejected on the
  63. first try by BXD, but gets through the
  64. second time around.)
  65. If the checksum is ok the block is
  66. written to the disk and the next
  67. block is recived. This continues
  68. untill the end of data marker is
  69. sent. BXD will say "DONE" and you should
  70. have a good copy of CBTERM/C64 now on
  71. your disk.
  72. Reset your computer and load CBTERM
  73. and use that as your new SMART terminal
  74. program.
  75.  
  76. Trying to keep BXD brief, many shortcuts
  77. were taken. There is no time out check
  78. or block number check as would be
  79. included in a full featured XMODEM
  80. program. If you suffer from noisey
  81. phone lines, you may be in trouble
  82. trying to use BXD. BXD expects to
  83. recieve 132 bytes in a block, if for
  84. some reason, a bute is dropped, BXD
  85. will sit in its loop and hang.
  86. Each byte that is recieve is marked
  87. by a "." displayed on the screen.
  88. and when a full block is recieve this
  89. is stated also. If you see BXD stop
  90. for longer than 60 seconds without
  91. recieveing any more bytes then you
  92. could try this: Press <STOP> to
  93. break the program. The enter: GOTO 50
  94. This will reject the last block recieved
  95. and restart looking for the block.
  96. If you coninualy get CHECK SUM BAD
  97. errors, then log off and reload
  98. your dumb terminal program and
  99. try the process again.
  100. Don't forget to Verify the disk you
  101. were using as the opened file will
  102. not be good.
  103.  
  104. Here is the code for BXD.BAS:
  105.  
  106. 10 print"bootstrap xmodem downloader"
  107. 11 print"(c) 1985 by chrisdos"
  108. 20 open2,2,0,chr$(6):dim i%(132)
  109. 30 ack$=chr$(6):nak$=chr$(21):eot$=chr$(4)
  110. 40 open8,8,8,"cbterm,w,p"
  111. 50 forx=1to25:get#2,a$:nextx:print#2,nak$;
  112. 60 gosub100
  113. 70 ifck%<>i%(132)thenprint"check sum bad":goto50
  114. 80 forx=4to131:print#8,chr$(i%(x));:nextx:get#2,a$
  115. 90 b=b+1:print"block ok":print#2,ack$;:goto60
  116. 100 n=fre(0):forx=1to132
  117. 110 ifpeek(667)=peek(668)goto110
  118. 120 get#2,a$:i%(x)=asc(a$+chr$(0)):print".";
  119. 130 ifx=1anda$=eot$thenclose8:print"done":print#2,ack$:stop
  120. 140 nextx:print"have block "b
  121. 150 ck%=0:forx=1to131
  122. 160 ck%=(ck%+i%(x))and255:nextx:return
  123.  
  124. Enter it carefully, don't forget the ;'s
  125. and other easyly overlooked things.
  126. If all goes well, you will be able
  127. to download a very fine terminal program
  128. that you can then use to up and down 
  129. load just about anything else.
  130.  
  131. If you have any questions, pleas leave
  132. them in a message to SYSOP in CBIG.
  133. No EMAIL please.
  134.  
  135.  HAVE FUN !
  136. BXD.BAS (C) 1985 by Chrisdos
  137. .+++++++++++++++++++++++++++++++++++++
  138. . Version 1.1 of BXD.BAS
  139. . This includes a small terminal routine in the program itself, and
  140. may work directly witout the need for an external terminal program.
  141. . Fill in lines 40 - 90 with a routine to dial your modem, or manually
  142. connect with your phone.
  143.  
  144.  
  145. 5 open5,2,0,chr$(6):dim i%(132)
  146. 10 printchr$(14)"[CLS][CRDN][CRDN][CRDN]  Bootstrap XMODEM Downloader  Ver 1.1"
  147. 20 print"  Written by Christopher Dunn
  148. 30 print"[CRDN][CRDN][CRDN] Use the <F1> key to start the Download"
  149. 100 print"[Terminal Mode]
  150. 110 get#5,a$:if st=8 goto170
  151. 120 a=asc(a$+chr$(0))and127
  152. 130 if a=8 then a=157:goto160
  153. 140 if a>=65 and a<=90 then a=a+32:goto160
  154. 150 if a>=97 and a<=122 then a=a-32
  155. 160 print chr$(a);
  156. 170 get a$:if a$="" goto110
  157. 180 a=asc(a$+chr$(0)):if a=20 then a=8:goto220
  158. 190 if a=133 goto 1000:rem do xmodem
  159. 200 if a>=193 and a<=218 then a=a-128:goto220
  160. 210 if a>=65 and a<=90 then a=a+32
  161. 220 print#5,chr$(a);
  162. 230 goto 110
  163. 1000 rem xmodem download
  164. 1010 ack$=chr$(6):nak$=chr$(21):eot$=chr$(4):b=1
  165. 1020 print"[CLR] Xmodem Downloader.
  166. 1030 print"Enter file name for your disk:";:f$="":input f$:if f$="" goto 100
  167. 1040 print"Working! Please standby"
  168. 1050 open8,8,8,f$+",p,w"
  169. 1060 forx=1to25:get#5,n$:next:q=0:print#5,nak$;
  170. 1070 get#5,c$:if st=8 goto 1170
  171. 1080 q=q+1:i%(q)=asc(c$+chr$(0)):print".";
  172. 1090 if q=1 and c$=eot$ then close8:print"DONE!":print#5,ack$:goto100
  173. 1100 z=0:if q<132 goto1070
  174. 1110 print:print"Checking Block"
  175. 1120 ck%=0:forx=1to131:ck%=(ck%+i%(x))and255:next
  176. 1130 if ck%<>i%(132) then print"Bad Checksum!":goto1060
  177. 1140 forx=4to131:print#8,chr$(i%(x));:next:get#5,n$
  178. 1150 print"Block "b" OK.":b=b+1:print#5,ack$;:q=0
  179. 1160 goto1070
  180. 1170 rem check for time out
  181. 1180 z=z+1:if z<500 goto 1070
  182. 1190 print"Block time out! Retrying....":z=0:goto1060
  183.